package com.livesource.client.web.project;

import com.google.gwt.user.client.ui.ListBox;
import com.livesource.client.model.project.Project;

/**
 * 
 * @UserInterface
 */
public class RepositoryTypeList extends ListBox {

	public RepositoryTypeList(String repositoryTypeSelected) {

		this.setWidth("200px");

		this.addItem(Project.REPOSITORY_TYPE_SUBVERSION);
		this.addItem(Project.REPOSITORY_TYPE_GIT);

		if (Project.REPOSITORY_TYPE_SUBVERSION.equals(repositoryTypeSelected)) {

			this.setSelectedIndex(0);

		} else if (Project.REPOSITORY_TYPE_GIT
				.equals(repositoryTypeSelected)) {

			this.setSelectedIndex(1);

		}
	}
}
